package actions;

import javax.swing.JOptionPane;

import gui.beans.Step;

public class DefaultAction implements Action {

	@Override
	public void fire(Step step) {
		if (step.getStatus() == Step.STARTED)
			doStarted(step);
		if (step.getStatus() == Step.COMPLETED)
			doCompleted(step);
		if (step.getStatus() == Step.ERROR)
			doError(step);
	}

	public void doStarted(Step step) {
		return;
	}

	public void doCompleted(Step step) {
		return;
	}

	public void doError(Step step) {
		step.setErrorMsg(JOptionPane.showInputDialog("Indicar el motivo del error:"));
	}
}
